//
// Copyright (C) [2024] Xingyun Integrated Circuit, Inc.
//
// GreenCode was a private technology asset of Xingyun Integrated Circuit， Inc （Confidential）
//  Author: Shawn.Tan
//  Date : 2025.10.28
//
//  History : Initial Version 2025.10.28
//

//
#include "MemoryTraitsGPGPU.h"

using namespace std;

namespace Green {

  MemoryTraitsRegistryGPGPU::MemoryTraitsRegistryGPGPU()
    : MemoryTraitsRegistry()
  {
    AddMutuallyExclusiveTraits({EMemoryAttributeType::MainRegion, EMemoryAttributeType::IORegion, EMemoryAttributeType::EmptyRegion});
    AddMutuallyExclusiveTraits({EMemoryAttributeType::MainRegion, EMemoryAttributeType::EmptyRegion, EMemoryAttributeType::LRSC});
    AddMutuallyExclusiveTraits({EMemoryAttributeType::MainRegion, EMemoryAttributeType::EmptyRegion, EMemoryAttributeType::AMONone, EMemoryAttributeType::AMOSwap, EMemoryAttributeType::AMOLogical, EMemoryAttributeType::AMOArithmetic});
    AddMutuallyExclusiveTraits({EMemoryAttributeType::MainRegion, EMemoryAttributeType::EmptyRegion, EMemoryAttributeType::AMOAligned, EMemoryAttributeType::AMOMisaligned});
    AddMutuallyExclusiveTraits({EMemoryAttributeType::IORegion, EMemoryAttributeType::EmptyRegion, EMemoryAttributeType::RVWMO, EMemoryAttributeType::RVTSO});
    AddMutuallyExclusiveTraits({EMemoryAttributeType::MainRegion, EMemoryAttributeType::EmptyRegion, EMemoryAttributeType::RelaxedOrdering, EMemoryAttributeType::StrongOrderingChannel0, EMemoryAttributeType::StrongOrderingChannel1});
    AddMutuallyExclusiveTraits({EMemoryAttributeType::EmptyRegion, EMemoryAttributeType::CoherentL1, EMemoryAttributeType::CoherentL2, EMemoryAttributeType::CoherentL3, EMemoryAttributeType::Incoherent});
    AddMutuallyExclusiveTraits({EMemoryAttributeType::EmptyRegion, EMemoryAttributeType::CacheableMasterPrivate, EMemoryAttributeType::CacheableShared, EMemoryAttributeType::CacheableSlavePrivate, EMemoryAttributeType::Uncacheable});
    AddMutuallyExclusiveTraits({EMemoryAttributeType::MainRegion, EMemoryAttributeType::EmptyRegion, EMemoryAttributeType::ReadIdempotent, EMemoryAttributeType::ReadNonIdempotent});
    AddMutuallyExclusiveTraits({EMemoryAttributeType::MainRegion, EMemoryAttributeType::EmptyRegion, EMemoryAttributeType::WriteIdempotent, EMemoryAttributeType::WriteNonIdempotent});
  }

}
